import request from '@/utils/request'
export function SysUser(params) {
  return request({
    url: '/sys/user',
    params
  })
}
export function SysUserpost(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}
export function SysUserDel(id) {
  return request({
    url: '/sys/user/' + id,
    method: 'delete'
  })
}
export function SysUserBatch(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
export function Employees(id) {
  return request({
    url: `/employees/${id}/personalInfo`
  })
}
export function EmployeesPut(data) {
  return request({
    url: `/employees/${data.userId}/personalInfo`,
    method: 'put',
    data
  })
}
export function EmployeeSjobs(id) {
  return request({
    url: `/employees/${id}/jobs`
  })
}
export function EmployeeSjobsPut(data) {
  return request({
    url: `/employees/${data.userId}/jobs`,
    method: 'put',
    data
  })
}
export function SysUserAssignRolesPut(id, roleIds) {
  return request({
    url: '/sys/user/assignRoles',
    method: 'put',
    data: {
      id,
      roleIds
    }
  })
}
